package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Menu;
import com.itheima.pojo.User;
import java.util.List;

public interface UserService {
    //通过用户名查找用户
    public User findByUsername(String username);
    //分页查询
    public PageResult findPage(QueryPageBean queryPageBean);
    //添加用户
    public void add(User user, Integer[] roleIds);
    //通过id查找用户
    public User findById(Integer id);
    //通过用户id查询角色信息
    public List<Integer> findRoleIdsByUserId(Integer id);
    //编辑用户信息
    public void edit(User user, Integer[] roleIds);
    //删除用户
    public void delete(Integer id);
    //加载用户的侧边栏菜单信息
    public List<Menu> findUserMenus(String username);
    //用户名重复校验
    public boolean checkName(String username);
}
